package com.springboot.file;

/**
 * @Classname FileException
 * @Description TODO
 * @Version 1.0.0
 * @Date 2024/1/11 14:26
 * @Created by zyj
 */
public class FileException extends Exception {

    private String errorCode;
    private String errorMsg;


    private Throwable cause;

    public FileException() {
    }


    public FileException(String errorMsg) {
        super(errorMsg);
        this.errorMsg = errorMsg;
    }

    public FileException(String errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }


    public FileException(String errorCode, Throwable cause) {
        super(cause);
        this.errorCode = errorCode;
        this.cause = cause;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }


    @Override
    public Throwable getCause() {
        return cause;
    }

    public void setCause(Throwable cause) {
        this.cause = cause;
    }
}
